Subversion Repositories SmartDukaan

Rev

Rev 2754 | Rev 2762 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2754 Rev 2755
Line 63... Line 63...
63
		$("#item_id").val(itemid);
63
		$("#item_id").val(itemid);
64
		return false;
64
		return false;
65
	});
65
	});
66
 
66
 
67
	$("#util_compare").click(function() {
67
	$("#util_compare").click(function() {
-
 
68
		$.colorbox({
-
 
69
			inline:true, 
68
		$.fn.colorbox({inline:true, href:"#compareLightBox", open:true, onComplete:function(){
70
			href:"#compareLightBox",
-
 
71
    		width:"350px",
-
 
72
    		height:"230px",
-
 
73
    		
69
			var posLeft = (document.documentElement.clientWidth / 2) - (parseInt($('#colorbox').css('width')) / 2);
74
    		onComplete: function(){
70
			var posTop = (document.documentElement.clientHeight / 2) - (parseInt($('#colorbox').css('height')) / 2);
75
    			$('#compareLightBox').show();
71
	
76
    		},
72
			$('#colorbox').css('top', posTop);
77
    		onCleanup: function(){
73
			$('#colorbox').css('left', posLeft);
78
    			$('#compareLightBox').hide();
-
 
79
    		}
74
		}});
80
    	});
75
	});
81
	});
76
 
82
 
77
	/* This code is for compare with button */
83
	/* This code is for compare with button */
78
	var availableNames = [];
84
	var availableNames = [];
79
	for (var k in productIdNames)availableNames.push(k);
85
	for (var k in productIdNames)availableNames.push(k);
Line 115... Line 121...
115
		}
121
		}
116
		var productOne = $("#catelog_id").val();
122
		var productOne = $("#catelog_id").val();
117
		window.location = "/compare-mobile-phones?p1="+productOne+"&p2="+productTwo;	
123
		window.location = "/compare-mobile-phones?p1="+productOne+"&p2="+productTwo;	
118
	}
124
	}
119
    
125
    
120
    function displayRelatedProducts(message){
-
 
121
    	var radBtn = "";
-
 
122
    	jQuery.ajax({
-
 
123
			type: "GET",
-
 
124
			url: "/related-products/" + $("#product_id").val(),
-
 
125
			data: "productid=" + $("#product_id").val(),
-
 
126
			success: function(msg)	{
-
 
127
				radBtn += "<h3 style='margin-top:5px; margin-bottom:5px;'>" + message + "</h3>";
-
 
128
				if($.trim(msg)!=""){
-
 
129
					radBtn += "<span style='font-size:14px; color:#003300; background-color:#ffffdd;  margin-bottom:8px;'>You can check out following similar products</span><hr size=1/>";
-
 
130
				}
-
 
131
				radBtn += msg;
-
 
132
				radBtn += '<div class="clearBoth"></div>';
-
 
133
				$("#colorSelLightBoxColor").html(radBtn);
-
 
134
				
-
 
135
		    	$.colorbox({
-
 
136
		    		inline:true,
-
 
137
		    		width:"400px",
-
 
138
		    		height:"410px",
-
 
139
		    		href:"#colorSelLightBoxColor",
-
 
140
		    		
-
 
141
		    		onComplete: function(){
-
 
142
		    			$('#colorSelLightBoxColor').show().find('.widgetChkBox').hide();
-
 
143
		    		},
-
 
144
		    		onCleanup: function(){
-
 
145
		    			$('#colorSelLightBoxColor').hide();
-
 
146
		    		}
-
 
147
		    	});
-
 
148
			}
-
 
149
		});		
-
 
150
    }
-
 
151
 
126
 
152
});
127
});
153
 
128
 
154
function changeSignInClass(){
129
function changeSignInClass(){
155
	if(document.getElementById("signinClass").className.indexOf("signin1") > -1)	{
130
	if(document.getElementById("signinClass").className.indexOf("signin1") > -1)	{