/* Author: 
	Levelwing
*/

$(document).ready(function(){

$(function() {
$('#slider1').anythingSlider({
					startStopped    : false, // If autoPlay is on, this can force it to start stopped
					width           : 939,   // Override the default CSS width
					height          : 380,   // Override the default CSS width
					autoPlayLocked  : true,  // If true, user changing slides will not stop the slideshow
					resumeDelay     : 10000, // Resume slideshow after user interaction, only if autoplayLocked is true (in milliseconds).
					easing: 'easeInOutExpo',
					delay: 13000,
					// Navigation
					startPanel          : 1,
					hashTags            : false,
					buildArrows         : true,
					toggleArrows        : true,
					buildNavigation     : true,
					toggleControls      : false,
					navigationFormatter : null,
					forwardText         : "&raquo;",
					backText            : "&laquo;",
					// Interactivity
					clickArrows         : "click",
					clickControls       : "click focusin",
					clickSlideshow      : "click",
					onSlideComplete : function(slider){
						// alert('Welcome to Slide #' + slider.currentPage);
					}
				})
				.anythingSliderFx({
        // target the entire panel and fade will take 500ms
        '.panel' : [ 'fade', 400, 'easeInOutCirc' ] 
    });
	});




$(".footer-ul-main-cert a, .show, .fancybox").fancybox({
	'titleShow'		: false,
	'transitionIn'		: 'fade',
	'transitionOut'		: 'fade',
	'overlayColor'	: '#000',
	'overlayOpacity' : '.9'
});
	 
	 
if (jQuery.browser.msie) { 
  if(parseInt(jQuery.browser.version) == 7) { 
      $(function() {
	var zIndexNumber = 1000;
	$('div').each(function() {
		$(this).css('zIndex', zIndexNumber);
		zIndexNumber -= 10;
	});
});
  } 
} 

// Initiate Menu
$("ul.sf-menu").superfish({
	autoArrows:  false,                           // disable generation of arrow mark-up
	animation:   {opacity:'show',height:'show'},  // fade-in and slide-down animation
	speed: 'fast'
}); 

// Image Preload
$('#slider1 img').imgpreload
({
	each: function()
	{
		// this = dom image object
		// callback executes when each image loads
	},
	all: function()
	{
		// this = jQuery image object selection
		// callback executes when all images are loaded
	}
});


// Social Bar Hover Effect
    $('.social-icons li a').hover(function() {
        $(this).stop().animate({'margin-left' : '0'}, 200);
    }, function(){
        $(this).stop().animate({'margin-left' : '-17px'}, 200);
    });





			
		
		$('#slider2').anythingSlider({
					startStopped    : false, // If autoPlay is on, this can force it to start stopped
					width           : 390,   // Override the default CSS width
					height           : 90,   // Override the default CSS width
					autoPlayLocked  : true,  // If true, user changing slides will not stop the slideshow
					resumeDelay     : 5000, // Resume slideshow after user interaction, only if autoplayLocked is true (in milliseconds).
					easing: 'easeInOutExpo',
					delay: 25000,
					// Navigation
					startPanel          : 1,
					hashTags            : false,
					buildArrows         : false,
					toggleArrows        : false,
					buildNavigation     : false,
					toggleControls      : false,
					navigationFormatter : null,
					forwardText         : "&raquo;",
					backText            : "&laquo;",
					// Interactivity
					clickArrows         : "click",
					clickControls       : "click focusin",
					clickSlideshow      : "click",
					onSlideComplete : function(slider){
						// alert('Welcome to Slide #' + slider.currentPage);
					}
				});



	
	// Expand Panel
	$("#open").click(function(){
		$("div#panel").slideDown("slow");
	
	});	
	
	// Collapse Panel
	$("#close").click(function(){
		$("div#panel").slideUp("slow");	
	});		
	
	// Switch buttons from "Log In | Register" to "Close Panel" on click
	$("#toggle a").click(function () {
		$("#toggle a").toggle();
	});		
		



    $('input[type="text"]').focus(function() {
        if (this.value == this.defaultValue){
            this.value = '';
        }
        if(this.value != this.defaultValue){
            this.select();
        }
    });
    $('input[type="text"]').blur(function() {
        if (this.value == ''){
            this.value = this.defaultValue;
        }
    });



    $('textarea').focus(function() {
        if (this.value == this.defaultValue){
            this.value = '';
        }
        if(this.value != this.defaultValue){
            this.select();
        }
    });
    $('textarea').blur(function() {
        if (this.value == ''){
            this.value = this.defaultValue;
        }
    });
});

       
























