﻿$(document).ready(function() {
	var date    = new Date();
	var entropy = String(date.getHours()) + String(date.getMinutes()) + String(date.getSeconds()) + String(date.getMilliseconds());
var favScriptImg = new Image();
var t_id = 22; 
var i_id = $(this).attr("rel"); 

//$('#images a.zoom').lightBox({fixedNavigation:true});

$.Lightbox.construct({
				show_linkback:	false, opacity: 0.6,
				text: {
					image:		'Photo'
				}
				
				
			});


         $('#images a.btn').click(function() { //start function when any link is clicked   
         var i_id = $(this).attr("rel"); 
                    
      //   alert(i_id)
        $(this).children().attr("src","images/btn_FavDone.gif");
         
          $.ajax({
   type: "GET",
   url: "addtoFavs.ashx",
   data: "i_id=" + i_id,
   success: function(msg){
  //   alert( "Data Saved: " + msg );

   }
 });
      //   $(this).fadeTo("fast", .33);
         $(this).parents("div:eq(1)").fadeTo("fast", .55);
       //  $(".topLinks a").fadeTo("fast", .33);
       //$(this).effect("transfer", { to: ".topLinks" }, 800);
       

       
       $(this).parents("div:eq(1)").effect("transfer", {to: "#ctl00_ContentPlaceHolder1_btnEnqs"}, 800); 
       
       $(".topLinks a").text("Image saved to 'My Enquiries'")        
        $(".topLinks a").effect("pulsate", {times: 2 }, 400);
        
          
        
         
         
 }); //close click(  
 

      $('LI.drawer UL:not(:first)').hide(); // hide all ULs inside LI.drawer except the first one
      $('H2.drawer-handle').click(function () {
        // hide all the drawer contents
        $('LI.drawer UL:visible').slideUp().prev().removeClass('open');

        // show the associated drawer content to 'this' (this is the current H2 element)
        // since the drawer content is the next element after the clicked H2, we find
        // it and show it using this:
        $(this).addClass('open').next().slideDown();
      });




//$("#images a.btn").click(function() { 

//    $(".zoom").effect("transfer", { 
//        to: "#ctl00_ContentPlaceHolder1_btnEnqs" 
//    }, 
//    800); 
//});


});