/***********************
*  Site Specific JS   *
************************/

// Custom JavaScript Document

$(document).ready(function(){  
  
  $("header").prependTo("body");
  $(".navbar").prependTo(".nav-placeholder");

  //********Windows IE8 and below popup*********//   		     		
	$("body").browserDetect( {     	
		name: "Sunstate Garages & Sheds",     
		logo: "http://cdn.myld.com.au/2/317/web_sunstate-garages-sheds_8e8fd32ff7.png",      
		phone: "(07) 4942 6349",     //optional
		fax: "(07) 4942 6342",      //optional
		email: "sales@sunstatesheds.com.au",      //optional
		address: "Shed 2, 1 Rockleigh Court, Glenella, QLD, 4740",  //optional	
		ldprofile: "http://www.localdirectories.com.au/Mackay-Area,QLD/Sunstate-Garages-Sheds/profile/zQOz" 
	});  
  
      if(jQuery.browser.mobile)
{
   var myPhotoSwipe = $(".fancybox").photoSwipe({ enableMouseWheel: false , enableKeyboard: false });
}
else
{
    /* Apply to single image */
    $("a.fancybox").fancybox();

   /* Apply fancybox to multiple items */
    $("a.fancybox[rel='gallery_group']").fancybox({
        'transitionIn'    :    'elastic',
        'transitionOut'    :    'elastic',
        'speedIn'        :    600, 
        'speedOut'        :    200 
    });
} 
  
        $(".info .box_img img").mouseover(function(){
            $(this).addClass("pulse");
            $(this).addClass("animated");
        })
        $(".info .box_img img").mouseout(function(){
            $(this).removeClass("pulse");
            $(this).removeClass("animated");
        })
	//********Mobile Telephone*********//  
	mobileTel(0749426349); //edit phone number
        
        $('<link id="favicon" type="image/x-icon" rel="shortcut icon" href="http://cdn.myld.com.au/2/279/web_sunstate-garages-sheds_09265860b4.png" />').appendTo('head');
        
      
             
            
            
            var isMobile = {
  		Android: function() {
				return navigator.userAgent.match(/Android/i);
			},
			BlackBerry: function() {
				return navigator.userAgent.match(/BlackBerry/i);
			},
			iOS: function() {
				//return navigator.userAgent.match(/iPhone|iPod|iPad/i);
				return navigator.userAgent.match(/iPhone|iPod/i);
			}, 
			iOS2: function() {
				return navigator.userAgent.match(/iPad/i);
			},
			Opera: function() {
				return navigator.userAgent.match(/Opera Mini/i);
			}, 
			Windows: function() {
				return navigator.userAgent.match(/IEMobile/i);
			},
			any: function() {
				return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows());
			}
		};		
		if( isMobile.any() || isMobile.iOS2()  )  {
               $(".hide-mobile").hide();
               $(".show-mobile").show();
    } 
             
            
        
	 
});

 