Subversion Repositories SmartDukaan

Rev

Rev 8531 | Rev 8934 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
6967 kshitij.so 1
function toggle(containerId){
2
        var divC = document.getElementById(containerId);
3
        if (divC.style.display == 'none') {
4
            divC.style.display = 'block';
5
        } else if (divC.style.display == 'block'){
6
            divC.style.display = 'none';
7
        }
8
        else {
9
        	divC.style.display = 'none';
10
        }
11
    }
12
 
4126 varun.gupt 13
$(function(){
4984 varun.gupt 14
	function CollapsibleWidget(container)	{
15
 
16
		this.widgetContainer = container;
17
		this.collapsbiles = $(container).children('.common-widget-control-bar, .common-widget-content-area');
18
		this.isCollapsed = null;
19
 
20
		this.collapse = function()	{
21
			$(this.collapsbiles).each(function()	{
22
				$(this).slideUp();
23
			});
24
			this.isCollapsed = true;
25
		};
26
 
27
		this.open = function()	{
28
			$(this.collapsbiles).each(function()	{
29
				$(this).slideDown();
30
			});
31
			this.isCollapsed = false;
32
		};
33
 
34
		this.test = function()	{
35
		};
36
	}
4798 varun.gupt 37
 
4984 varun.gupt 38
	ResearchWidget.prototype = new CollapsibleWidget();
39
	ResearchWidget.prototype.constructor = CollapsibleWidget;
40
 
41
	function ResearchWidget(container)	{
42
		CollapsibleWidget.call(this, container);
43
	}
44
 
4798 varun.gupt 45
	function updateCompareCount()	{
46
		$('#research_compare_count').html($('#myresearch input[type="checkbox"]:checked').length);
47
	}
48
 
4126 varun.gupt 49
	/** Sidebar Widgets **/
4237 varun.gupt 50
 
6840 kshitij.so 51
	$('#otg_know_more,.otg_know_more').click(function(){
6552 kshitij.so 52
		$.colorbox({
53
    		width: "490px",
6772 kshitij.so 54
    		height: "420px",
6552 kshitij.so 55
    		inline: true,
56
    		href: "<h3 style='text-align: center; margin: 18px; font-size: 14px;'>On Time Guarantee, We Pay if we Delay</h3>" +
57
		"<p style='text-align: justify; margin-left: 12px; margin-right: 12px; margin-bottom: 9px; line-height: 22px;'>Saholic stands for 100% on time delivery. We ensure all your orders reach your doorstep on or "+
58
        "before the promised delivery date. In the rare case that we deliver an order later than promised "+
59
        "we will compensate you.This Guarantee is Valid on"+
60
        "</p>" +
61
        "<ul style='list-style: disc none none; margin-left: 25px; text-align: justify; margin-right:12px; line-height: 22px;'><li>All Mobiles, Cameras, Laptops, Tablets and Accessories above Rs. 2000 in value."+
62
        "</li>"+
63
        "<li>Orders Placed using Credit/Debit Card, Net Banking, EMI, Prepaid Cash Cards."+
64
        "</li>"+
65
        "</ul>"+
6772 kshitij.so 66
        "<p style='text-align: justify; line-height: 22px; margin: 12px;'>Compensation for delay is in the form of Gift Vouchers at the rate of Rs. 50 per business day. " +
67
        "GV can be applied to ANY product on Saholic.com without limitation.</p>"+
7063 kshitij.so 68
        "<span class='right'><a target='_blank' href='/static/on-time-guarantee' style='margin-right: 12px; color: #006699';>Detailed Terms & Conditions</a></span>",
6552 kshitij.so 69
        onComplete: function(){
70
		trackEventWithGA('Widget', 'OTG Know More is clicked', '');
71
			}
72
    	});
73
	});
7680 rajveer 74
 
7809 rajveer 75
	$('#cod_know_more,.cod_know_more').click(function(){
7680 rajveer 76
		$.colorbox({
7872 rajveer 77
    		width: "400px",
78
    		height: "200px",
7680 rajveer 79
    		inline: true,
7898 amit.gupta 80
    		href: "<ul style='list-style:inside; margin-left: 25px; margin-right:12px; font-size:15px; line-height: 22px;'>"
7872 rajveer 81
    			+ "Expected Delivery Date for "
7873 rajveer 82
    			+"<li list-style:inside>Prepaid orders is " + $("#shipping_time .red").html() + "</li>"+
83
    			"<li list-style:inside>" + $("#shipping_time .cod").html() + "</li>"+
7809 rajveer 84
        "</ul>",
7680 rajveer 85
        onComplete: function(){
7809 rajveer 86
		trackEventWithGA('Widget', 'COD Know More is clicked', '');
7680 rajveer 87
			}
88
    	});
89
	});
90
 
7846 rajveer 91
 
4237 varun.gupt 92
	$('#shoppingExpInfo').click(function(){
93
		$.colorbox({
4284 varun.gupt 94
    		width: "550px",
95
    		height: "320px",
4237 varun.gupt 96
    		inline: true,
97
    		href: "<h3>Shopping with Saholic.com is completely safe</h3><br />" +
4284 varun.gupt 98
		"<b>1.</b> We are part of Spice Group - India's # 1 Mobile retailer.<br /><br />" +
99
		"<b>2.</b> We procure directly from the Manufacturers - Hence we only sell genuine products with full Manufacturer Warranty.<br /><br />" +
100
		"<b>3.</b> We provide free Next Day Delivery to most locations - You can check the delivery time to your location by entering your pin code on the product page.<br /><br />" +
6173 kshitij.so 101
		"<b>4.</b> We use the best Internet Security technology - Your payment is 100% secure.<br />",
4372 varun.gupt 102
			onComplete: function(){
6261 amit.gupta 103
				trackEventWithGA('Widget', 'Safe shopping sticky banner is clicked', '');
4372 varun.gupt 104
			}
4237 varun.gupt 105
    	});
106
	});
6245 kshitij.so 107
 
8434 kshitij.so 108
	$('#promotion-diwali').click(function(){
109
		$.colorbox({
110
    		width: "550px",
111
    		height: "280px",
112
    		inline: true,
113
    		href: "<h3 style='font-size:15px; text-align:center; font-weight:bold; margin-left:15px; margin-top:5px;margin-bottom:10px'>Terms and Conditions</h3>" +
114
    		"<ul style='text-align: justify; padding-right: 10px; width: 93%; padding-left: 16px; line-height: 25px;'>"+
115
    		"<li>The offer is valid on all accessories.</li>"+
116
    		"<li>A discount of 10% (upto a maximum of Rs.500) will be applicable.</li>"+
117
    		"<li>The discount can be enjoyed upon using the coupon code: <b>saholicdiwali</b></li>"+
8494 kshitij.so 118
    		"<li> The offer is also valid on Cash on Delivery (COD) orders.</li>"+ 
8434 kshitij.so 119
    		"<li>Only one order per person will be accepted.</li>"+
8693 kshitij.so 120
    		"<li>The offer is valid till November 12, 2013 or till stocks last.</li>"+
8494 kshitij.so 121
    		"<li>Saholic reserves the right to end promotion without any notice.</li>"+ 
8434 kshitij.so 122
    		"</ul>",
123
			onComplete: function(){
124
				trackEventWithGA('Widget', 'Saholic Diwali sticky banner is clicked', '');
125
			}
126
    	});
127
	});
6552 kshitij.so 128
 
8434 kshitij.so 129
 
130
 
6970 kshitij.so 131
	$('.insuranceInfo').click(function(){
132
		$.colorbox({
133
    		width: "520px",
134
    		height: "280px",
135
    		inline: true,
136
    		href: "<h3 style='font-size:15px; text-align:center; font-weight:bold; margin-left:15px; margin-top:5px;margin-bottom:10px'>Exclusively at Saholic</h3>" +
137
    		"<ul style='text-align: justify; padding-right: 10px; width: 93%; padding-left: 16px; line-height: 25px;'>"+
138
    		"<li>Only Saholic brings to you an option to protect your smartphone against theft and burglary.</li>"+
139
    		"<li>While buying your favourite mobile from Saholic, you can opt for 1 year WorldWide theft insurance.</li>"+
140
    		"<li>Introductory offer - You can opt for insurance by paying an all inclusive nominal fee of 1.5% of price of your mobile.</li>"+
7062 kshitij.so 141
    		"<a target='_blank' href='/static/insurance-terms' style='float: right; text-decoration: none;color:#006699';>Detailed Terms and Conditions</a>"+
6970 kshitij.so 142
    		"</ul>",
143
			onComplete: function(){
144
				trackEventWithGA('Widget', 'Insurance sticky banner is clicked', '');
145
			}
146
    	});
147
	});
148
 
149
 
8434 kshitij.so 150
 
151
 
6959 kshitij.so 152
	$('.emiInfo').click(function(){
6453 kshitij.so 153
		$.colorbox({
6967 kshitij.so 154
    		width: "590px",
8279 kshitij.so 155
    		height: "480px",
6453 kshitij.so 156
    		inline: true,
7051 kshitij.so 157
    		href: "<h3 style='font-size: 15px; text-align: center; font-weight: bold; margin-left: 15px; margin-bottom: 10px; margin-top: 7px;'>Completely Free EMI For 3 Months</h3>" +
6967 kshitij.so 158
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/hdfc-icon.png' style='vertical-align: middle;'></div>"+
8279 kshitij.so 159
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9, 12 and 18 months.Completely free for 3 months<br><a onclick='toggle(\"emi-table-hdfc\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
160
    		"<div id='emi-table-hdfc' style='padding-left: 5px; display: none;'>"+
161
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
6967 kshitij.so 162
    		"<thead>"+
163
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
164
            "</thead>"+
165
            "<tbody>"+
166
            "<tr>"+
167
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
168
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
169
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
7011 kshitij.so 170
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
171
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>18 Months</th>"+
6967 kshitij.so 172
            "</tr>"+
173
            "<tr>"+
174
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
175
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>4.22%</td>"+
176
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>7.04%</td>"+
7011 kshitij.so 177
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>9.67%</td>"+
178
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>15.36%</td>"+
6967 kshitij.so 179
            "</tr>"+
180
            "</tbody>"+
181
            "</table>"+
182
            "<br>"+
183
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
184
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
6772 kshitij.so 185
    		"<br>"+
6967 kshitij.so 186
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li>"+
187
    		"</ul>"+
6959 kshitij.so 188
    		"<br>"+
8279 kshitij.so 189
    		"</div>"+
8529 kshitij.so 190
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/citi-icon.png' style='vertical-align: middle;'></div>"+
191
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3 and 6 months.Completely free for 3 months<br><a onclick='javascript:toggle(\"emi-table-citi\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
8279 kshitij.so 192
    		"<div id='emi-table-citi' style='padding-left: 5px;display: none;'>"+
193
    		"<table width='70%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
194
    		"<thead>"+
195
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='2'>All Inclusive Processing Fee*</th>"+
196
            "</thead>"+
197
            "<tbody>"+
198
            "<tr>"+
199
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 35%;'>3 Months</th>"+
200
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 35%;'>6 Months</th>"+
201
            "</tr>"+
202
            "<tr>"+
203
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
204
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray; text-align: center;'>4.22%</td>"+
205
            "</tr>"+
206
            "</tbody>"+
207
            "</table>"+
208
            "<br>"+
209
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
210
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
211
    		"<br>"+
212
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li>"+
213
    		"</ul>"+
214
    		"<br>"+
215
    		"</div>"+
216
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/icici-icon.png' style='vertical-align: middle;'></div>"+
217
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 ,12 and 18 months.Completely free for 3 months<br><a  onclick='javascript:toggle(\"emi-table-icici\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
218
    		"<div id='emi-table-icici' style='padding-left: 5px;display: none;'>"+
219
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
220
    		"<thead>"+
221
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
222
            "</thead>"+
223
            "<tbody>"+
224
            "<tr>"+
225
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
226
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
227
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
228
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
229
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>18 Months</th>"+
230
            "</tr>"+
231
            "<tr>"+
232
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
233
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
234
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
235
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>11.53%</td>"+
236
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>16.72%</td>"+
237
            "</tr>"+
238
            "</tbody>"+
239
            "</table>"+
240
            "<br>"+
241
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
242
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
243
    		"<br>"+
244
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li><br><li>Minimum payment amount required to convert into EMI is Rs 1500.</li>"+
245
    		"</ul>"+
246
    		"<br>"+ 
247
    		"</div>"+
248
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/sbi-icon.png' style='vertical-align: middle;'></div>"+
249
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 ,12 and 18 months.Completely free for 3 months<br><a onclick='javascript:toggle(\"emi-table-sbi\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
250
    		"<div id='emi-table-sbi' style='padding-left: 5px;display: none;'>"+
251
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
252
    		"<thead>"+
253
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
254
            "</thead>"+
255
            "<tbody>"+
256
            "<tr>"+
257
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
258
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
259
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
260
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
261
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>18 Months</th>"+
262
            "</tr>"+
263
            "<tr>"+
264
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
265
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
266
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
267
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>11.53%</td>"+
268
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>16.72%</td>"+
269
            "</tr>"+
270
            "</tbody>"+
271
            "</table>"+
272
            "<br>"+
273
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
274
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
275
    		"<br>"+
276
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li><br><li>Minimum payment amount required to convert into EMI is Rs 1000.</li>"+
277
    		"</ul>"+
278
    		"<br>"+
279
    		"</div>"+
280
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/kotak-icon.png' style='vertical-align: middle;'></div>"+
281
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 and 12 months.Completely free for 3 months<br><a onclick='javascript:toggle(\"emi-table-kotak\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
282
    		"<div id='emi-table-kotak' style='padding-left: 5px;display: none;'>"+
283
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
284
    		"<thead>"+
285
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
286
            "</thead>"+
287
            "<tbody>"+
288
            "<tr>"+
289
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
290
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
291
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
292
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
293
            "</tr>"+
294
            "<tr>"+
295
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
296
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
297
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
298
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>11.53%</td>"+
299
            "</tr>"+
300
            "</tbody>"+
301
            "</table>"+
302
            "<br>"+
303
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
304
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
305
    		"<br>"+
306
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li><br><li>Minimum payment amount required to convert into EMI is Rs 500.</li>"+
307
    		"</ul>"+
308
    		"<br>"+
309
    		"</div>"+
310
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/hsbc-icon.png' style='vertical-align: middle;'></div>"+
311
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 and 12 months.Completely free for 3 months<br><a onclick='javascript:toggle(\"emi-table-hsbc\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
312
    		"<div id='emi-table-hsbc' style='padding-left: 5px;display:none;'>"+
313
    		"<table width='70%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
314
    		"<thead>"+
315
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
316
            "</thead>"+
317
            "<tbody>"+
318
            "<tr>"+
319
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
320
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
321
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
322
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
323
            "</tr>"+
324
            "<tr>"+
325
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
326
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
327
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
328
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>11.53%</td>"+
329
            "</tr>"+
330
            "</tbody>"+
331
            "</table>"+
332
            "<br>"+
333
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
334
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
335
    		"<br>"+
336
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li><br><li>Minimum payment amount required to convert into EMI is Rs 1500.</li>"+
337
    		"</ul>"+
338
    		"<br>"+
339
    		"</div>"+
8531 kshitij.so 340
    		"<div style='display: none; padding-left: 5px;' class='bank-logo'><img src='/images/std-chartered-icon.png' style='vertical-align: middle;'></div>"+
341
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: none; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 and 12 months.Completely free for 3 months<br><a onclick='javascript:toggle(\"emi-table-std-chart\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
8279 kshitij.so 342
    		"<div id='emi-table-std-chart' style='padding-left: 5px;display: none;'>"+
343
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
344
    		"<thead>"+
345
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
346
            "</thead>"+
347
            "<tbody>"+
348
            "<tr>"+
349
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
350
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
351
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
352
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
353
            "</tr>"+
354
            "<tr>"+
355
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
356
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
357
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
358
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>11.53%</td>"+
359
            "</tr>"+
360
            "</tbody>"+
361
            "</table>"+
362
            "<br>"+
363
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
364
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
365
    		"<br>"+
366
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li><br><li>Minimum payment amount required to convert into EMI is Rs 500.</li>"+
367
    		"</ul>"+
368
    		"<br>"+
369
    		"</div>"+
8398 kshitij.so 370
    		"<div style='display: none; padding-left: 5px;' class='bank-logo'><img src='/images/indusind-icon.png' style='vertical-align: middle;'></div>"+
371
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: none; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 6, 9 and 12 months. <br><a onclick='javascript:toggle(\"emi-table-indus\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
8279 kshitij.so 372
    		"<div id='emi-table-indus' style='padding-left: 5px;display: none;'>"+
373
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
374
    		"<thead>"+
375
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
376
            "</thead>"+
377
            "<tbody>"+
378
            "<tr>"+
379
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
380
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
381
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
382
            "</tr>"+
383
            "<tr>"+
384
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%%</td>"+
385
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
386
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>11.53%</td>"+
387
            "</tr>"+
388
            "</tbody>"+
389
            "</table>"+
390
            "<br>"+
391
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
392
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
393
    		"<br>"+
394
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li>"+
395
    		"</ul>"+
396
    		"<br>"+
397
    		"</div>"+
398
    		"<br><br>",
6453 kshitij.so 399
			onComplete: function(){
400
				trackEventWithGA('Widget', 'Emi info widget is clicked', '');
401
			}
402
    	});
403
	});
6245 kshitij.so 404
 
6792 vikram.rag 405
	$('a.mk_best_deal_detail').live('click', function(){
406
		var offerLinkHtml = '';
407
		if(OFFER_HELP_LINK!='$OFFER_DETAIL_LINK') {
6795 vikram.rag 408
			offerLinkHtml = '<a target="_blank" href="' +OFFER_HELP_LINK + '" style="z-index: 1; float: right; bottom: 0px; right: 0px; margin: 15px; position: relative;">More</a></span>';
6792 vikram.rag 409
		}
410
		$.colorbox({
411
			width: "550px",
412
    		height: "300px",
413
    		inline: true,
414
    		href: '<h3 style="text-align: left; padding: 10px;">Offer Details</h3>' +
415
    			'<p style="text-align: justify; line-height: 22px; margin: 12px;">' + OFFER_HELP_TEXT +
416
    			'</p><span class="right">' + offerLinkHtml 
417
		});
418
	});
6453 kshitij.so 419
 
6792 vikram.rag 420
 
6245 kshitij.so 421
	$('#pickupstoreInfo').click(function(){
422
		$.colorbox({
423
    		width: "550px",
424
    		height: "370px",
425
    		inline: true,
426
    		href: "<h3>Frequently Asked Questions</h3><br />" +
7062 kshitij.so 427
		"<b style='color: black; cursor: default;'>Q)</b> What is 'Buy Online & Pickup in Store' ?<br /><br />" +
428
		"<b style='color: black; cursor: default;'>A)</b> Buy Online from Saholic.Com and pickup your product from the nearest Spice Hotspot Retail Store.<br /><br />" +
429
		"<b style='color: black; cursor: default;'>Q)</b> How do i avail this facility ?<br /><br />" +
430
		"<b style='color: black; cursor: default;'>A)</b> Simply select Pickup In Store On the Shipping Page and select your nearest store. Please note this facility is available only in Delhi/NCR.</a><br /><br />"+
431
		"<b style='color: black; cursor: default;'>Q)</b> When will the product be available for pickup ?<br /><br />" +
432
		"<b style='color: black; cursor: default;'>A)</b> You can enter your pin code on the Product Page to find estimated time to deliver. After placing the order we will also give you the estimated date for pickup.</a><br /><br />",
6245 kshitij.so 433
 
434
			onComplete: function(){
6262 amit.gupta 435
				var ev = "Product Page";
6303 amit.gupta 436
				var label = window.location.pathname;
6264 amit.gupta 437
				if (label=="" || label=="#")
6261 amit.gupta 438
				{
6303 amit.gupta 439
					label = "";
6262 amit.gupta 440
					ev = "Home Page";
6261 amit.gupta 441
				}
6262 amit.gupta 442
				else if (label.indexOf("shipping") != -1){
443
					ev = "Shipping Page";
444
					var blkstr = [];
6263 amit.gupta 445
					jQuery("#cartDetail").find("span.cart-item-name").each(function(key,str){
6262 amit.gupta 446
						blkstr.push(str);
447
					});
6303 amit.gupta 448
					label = blkstr.join(", ");
449
				} else if (label.substr(label.lastIndexOf('/') + 1).length==5 && typeof label.substr(label.lastIndexOf('/') + 1) =="number") {
450
					ev = "Category Page";
451
				} else if (label.substr(label.lastIndexOf('-') + 1).length==7  && typeof label.substr(label.lastIndexOf('-') + 1) =="number") {
452
					ev = "Product Page";
6262 amit.gupta 453
				}
6261 amit.gupta 454
				trackEventWithGA('Pickup in Store LightBox', ev, label);
6245 kshitij.so 455
			}
456
    	});
457
	});
4126 varun.gupt 458
 
5420 amit.gupta 459
	$('.common-widget-top-bar').live('click', function(e, callback){
4126 varun.gupt 460
		var isColapsed = $(this).data('is_colapsed') == true ? true : false;
461
		var widgetBox = $(this).siblings('.common-widget-content-area');
462
		var controlBox = $(this).siblings('.common-widget-control-bar');
463
		var controlBoxArrowImg = $(this).find('img');
4210 varun.gupt 464
 
4126 varun.gupt 465
		if (isColapsed)	{
466
			if(controlBox.length > 0)	{
467
				$(controlBox).slideDown('fast', function(){
5420 amit.gupta 468
					$(widgetBox).slideDown('fast', callback);
4126 varun.gupt 469
					$(controlBoxArrowImg).attr('src', '/images/IconDownArrow_UnselectedTab.png');
470
				});
471
			} else	{
472
				$(widgetBox).slideDown();
473
				$(controlBoxArrowImg).attr('src', '/images/IconDownArrow_UnselectedTab.png');
474
			}
475
		} else	{
476
			$(widgetBox).slideUp(function(){
477
				$(controlBox).slideUp('fast');
478
				$(controlBoxArrowImg).attr('src', '/images/IconRightArrow_UnselectedTab.png');
479
			});
480
		}
481
		$(this).data('is_colapsed', !isColapsed);
482
	});
483
 
484
	/**
485
	 * Update count of products checked for comparison
486
	 **/
487
	$('#myresearch input[type="checkbox"]').live('click', function(){
4798 varun.gupt 488
		updateCompareCount();
4126 varun.gupt 489
	});
490
 
491
	$("#research_compare").live('click', function(){
492
		var seldata = "";
5322 amit.gupta 493
		var prodnames = "";
4126 varun.gupt 494
		var tot = 1;
495
		var saprt = "";
496
		var par = $('#myresearch').find('input[type=checkbox]:checked');
4926 varun.gupt 497
		var haveSameProductType = true;
498
		var productType = null;
499
 
4126 varun.gupt 500
		$(par).each(function(){
4926 varun.gupt 501
 
502
			if(productType != null && productType != $(this).attr('producttype'))	{
503
				haveSameProductType = false;
504
			}
505
			productType = $(this).attr('producttype');
506
 
4126 varun.gupt 507
			if(tot == 1)	{
5358 amit.gupta 508
				prodnames += $(this).attr("title").replace(/ +/g, '-').replace(/\/+/g,'-').replace(/-+/g,'-').toLowerCase();
4126 varun.gupt 509
				seldata += "p" + tot + "=" + $(this).val();
510
			} else	{
511
				seldata += "&p" + tot + "=" + $(this).val();
5358 amit.gupta 512
				prodnames += "-vs-" + $(this).attr("title").replace(/ +/g, '-').replace(/\/+/g,'-').replace(/-+/g,'-').toLowerCase();
4126 varun.gupt 513
			}
514
			tot ++;
515
		});
4984 varun.gupt 516
 
4926 varun.gupt 517
		if(! haveSameProductType)	{
518
			alert("Only products of same category can be compared");
519
		} else if(tot > 6)	{
4126 varun.gupt 520
			alert("Can compare upto five products only.");
521
		} else if(tot > 2)	{
5552 phani.kuma 522
			window.location = "/compare-" + productType.replace(/ +/g, '-').toLowerCase() + "/" + prodnames + "?" + seldata+"&fromsrc=comparison_widget";
4126 varun.gupt 523
		} else	{
524
			alert("Please select atleast two products");
525
		}
526
	});
527
 
528
	$("#research_delete").live('click', function(){
529
		var research_tot = $("#research_total").val();
530
		var seldata = [];
531
		var tot = 0;
532
		var saprt = "";
533
		var par = $('#myresearch').find('input[type=checkbox]:checked');
534
 
535
		$(par).each(function(){
536
			seldata.unshift($(this).val());
537
			tot ++;
538
		});
539
 
540
		if(tot > 0)	{
541
			var t = (research_tot * 1) - (tot * 1);
542
			$("#research_total").val(t);
543
 
544
			jQuery.ajax({
545
				type: "GET",
546
				url: "/deletefromresearch/[" + seldata + "]?_method=delete",
547
				success: function(msg)	{
548
					jQuery.each(seldata, function(intIndex, objValue){
549
						delete_from_storage_set("resitems", objValue);
550
						$("#myresearch").find("#" + objValue).fadeOut('slow', function() {
551
							$(this).remove();
552
							if(t === 0)	{
553
								$("#research_default").css("display", "block");
554
							}
555
						});
556
					});
4984 varun.gupt 557
 
4922 varun.gupt 558
					//Updating the count
559
					$('#research_compare_count').html($('#myresearch input[type="checkbox"]:checked').length - seldata.length);
4984 varun.gupt 560
 
561
					if ($('#myresearch input[type="checkbox"]').length - seldata.length <= 0)	{
562
						$("#myresearch").children(".common-widget-top-bar").trigger('click');
563
					}
4126 varun.gupt 564
				}
565
			});
566
		} else	{
567
			alert("Please select atleast one product");
568
		}
569
	});
570
 
571
	// No uid cookie
572
	if (!$.cookie("uid"))	{
573
		// No uid in storage
574
		if (!$.Storage.get("uid"))	{
575
			if (!$.Storage.get("resitems"))	{
576
				$.Storage.set("resitems", "[]");
577
			}
578
			if (!$.Storage.get("histitems"))	{
579
				$.Storage.set("histitems", "[]");
580
			}
581
		}
582
		else	{			// uid in storage : logout
583
			$.Storage.remove("uid");
584
			$.Storage.set("resitems", "[]");
585
			$.Storage.set("histitems", "[]");
586
		}
587
		load_research_widget();
588
		load_history_widget();
589
	}
590
	else	{				// With uid cookie
591
		var cookie = $.cookie("uid");
592
		// Just logged in merge storage items
593
		if (!$.Storage.get("uid"))	{
594
			$.Storage.set("uid", cookie);
595
			merge_history_items();
596
			load_research_items();
597
		}
598
		else	{
599
			// UID changed
600
			if ( cookie != $.Storage.get("uid"))	{
601
				$.Storage.set("uid", cookie);
602
				$.Storage.set("resitems", "[]");
603
				$.Storage.set("histitems", "[]");
604
				merge_history_items();
605
				load_research_items();
606
			}
607
			else	{		// Uid is same
608
				if (!$.Storage.get("resitems"))	{
609
					$.Storage.set("resitems", "[]");
610
					load_research_items();
611
				}
612
				else	{
613
					load_research_widget();
614
				}
615
 
616
				if (!$.Storage.get("histitems"))	{
617
					$.Storage.set("histitems", "[]");
618
					merge_history_items();
619
				}
620
				else	{
621
					load_history_widget();
622
				}
623
			}
624
		}
625
	}
4798 varun.gupt 626
 
627
	function load_research_items(){
628
		jQuery.ajax({
629
			type: "GET",
630
			url: "/myresearch",
631
			cache: false,
632
			success: function(json) {
633
			    $.Storage.set("resitems", json);
634
			    load_research_widget();
635
		    }
636
		});
637
	}
638
 
639
	function load_research_widget(){
640
		var myResearchWidgetContainer = $("#myresearch");
641
 
642
		if($(myResearchWidgetContainer).length == 0) {
643
			return;
644
		}
645
		var resitems = $.Storage.get("resitems");
646
 
647
		if (resitems == "[]") {
648
			var emptyResWidgetHtml = '<table border="0" width="100%" cellspacing="1" cellpadding="0" id="research_default">\
649
		      <tbody>\
650
		        <tr><td align="center"><b>Add items to compare list</b></td></tr>\
651
		       </tbody>\
652
		      </table>';
653
			$(myResearchWidgetContainer).find(".common-widget-content-area").html(emptyResWidgetHtml);
654
			$(myResearchWidgetContainer).children(".common-widget-top-bar").trigger('click');
655
			return;
656
		}
657
		var params = "/" + resitems;
658
 
659
		jQuery.ajax({
660
			type : "GET",
661
			url : "/myresearch" + params,
662
			cache: true,
663
			success : function(html) {
664
	   		    $("#myresearch").html(html);
665
	   			updateCompareCount();
666
 
667
			    // Product Title
668
			    $("#myresearch table td div a.truncate").each(function() {
669
						$(this).truncate({addtitle : true});
670
			    });
671
 
672
			    // Product Price
673
			    $("#myresearch table td div div.price").each(function() {
674
						$(this).truncate({addtitle : true});
675
				});
676
 
677
			    // Product Details
678
			    $("#myresearch table td div div.text").each(function() {
679
						$(this).truncate( {addtitle : true});
680
				});
681
		    }
682
		});
683
	}
7846 rajveer 684
});
685
 
7849 rajveer 686
function displayCod(item_id)	{
7846 rajveer 687
	$.colorbox({
7872 rajveer 688
		width: "400px",
689
		height: "200px",
7846 rajveer 690
		inline: true,
7873 rajveer 691
		href: "<ul style='list-style:inside; margin-left: 25px; text-align: justify; margin-right:12px; font-size:15px; line-height: 22px;'>"
7872 rajveer 692
			+ "Expected Delivery Date for "
7873 rajveer 693
			+"<li list-style:inside>Prepaid orders is " + $('#days_' + item_id).html() + "</li>"+
7879 rajveer 694
			"<li list-style:inside>Cash On Delivery orders is " + $('#coddays_' + item_id).html() + "</li>"+
7846 rajveer 695
    "</ul>",
696
    onComplete: function(){
697
	trackEventWithGA('Widget', 'COD Know More is clicked', '');
698
		}
699
	});
700
}